'use strict';

module.exports = app => {
    class ImLoginController extends app.Controller {

        async getToken() {
            console.log("请求IM的token-------------------");
            const imToken = await this.service.im.imLogin();
            console.log(imToken);
            this.ctx.session.member.sdktoken = imToken.data.token;

            await this.ctx.render("/im/index.html");
        }

        async imDetail() {
            await this.ctx.render("/im/detail.html");
        };
    }
    return ImLoginController;
};



